﻿package com.findMoneyGame.pages {
	
	import flash.events.Event;
	import flash.events.MouseEvent;
	
	import com.findMoneyGame.Engine;
	
	
	public class HomePage extends WrappingPage {

		public function HomePage (e : Engine) { super(e); }

		protected override function activatePage () {
			playButton.addEventListener(MouseEvent.CLICK, showGameLevel);
			super.activatePage();
		}
		protected override function deactivatePage () {
			playButton.removeEventListener(Wrapper.SHOW_GAMELEVEL, showGameLevel);
			super.deactivatePage();
		}

		private function showGameLevel (e : Event) { changeState(new GamePage(engine)); }
	}
	
}
